package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysSiteMapper;
import com.ruoyi.system.domain.SysSite;
import com.ruoyi.system.service.ISysSiteService;
import com.ruoyi.common.core.text.Convert;

/**
 * siteService业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-22
 */
@Service
public class SysSiteServiceImpl implements ISysSiteService 
{
    @Autowired
    private SysSiteMapper sysSiteMapper;

    /**
     * 查询site
     * 
     * @param name site主键
     * @return site
     */
    @Override
    public SysSite selectSysSiteByName(String name)
    {
        return sysSiteMapper.selectSysSiteByName(name);
    }

    /**
     * 查询site列表
     * 
     * @param sysSite site
     * @return site
     */
    @Override
    public List<SysSite> selectSysSiteList(SysSite sysSite)
    {
        return sysSiteMapper.selectSysSiteList(sysSite);
    }

    /**
     * 新增site
     * 
     * @param sysSite site
     * @return 结果
     */
    @Override
    public int insertSysSite(SysSite sysSite)
    {
        return sysSiteMapper.insertSysSite(sysSite);
    }

    /**
     * 修改site
     * 
     * @param sysSite site
     * @return 结果
     */
    @Override
    public int updateSysSite(SysSite sysSite)
    {
        return sysSiteMapper.updateSysSite(sysSite);
    }

    /**
     * 批量删除site
     * 
     * @param names 需要删除的site主键
     * @return 结果
     */
    @Override
    public int deleteSysSiteByNames(String names)
    {
        return sysSiteMapper.deleteSysSiteByNames(Convert.toStrArray(names));
    }

    /**
     * 删除site信息
     * 
     * @param name site主键
     * @return 结果
     */
    @Override
    public int deleteSysSiteByName(String name)
    {
        return sysSiteMapper.deleteSysSiteByName(name);
    }
}
